import React from 'react';
import ReactDOM from 'react-dom';
import './index.css';
import App from './App';
import 'antd-mobile/dist/antd-mobile.css'; 
import * as serviceWorker from './serviceWorker';
import { createStore, applyMiddleware } from 'redux';
import promise from 'redux-promise';
import { Provider } from 'react-redux';
import reducers from './reducers';
import './util/glob'

const createStoreWithMiddleware = applyMiddleware(promise)(createStore); 
window.popupWindow = true;

ReactDOM.render(
	<Provider store={createStoreWithMiddleware(reducers)}> 
			<App /> 
	</Provider>, document.getElementById('root'));

// If you want your app to work offline and load faster, you can change
// unregister() to register() below. Note this comes with some pitfalls.
// Learn more about service workers: https://bit.ly/CRA-PWA
serviceWorker.unregister();
